package com.example.springboot.mapper;

import com.example.springboot.entity.Device;
import com.example.springboot.entity.Instore;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface InstoreMapper {
    @Select("SELECT * from sys_instore")
    List<Instore> findAll();

    @Insert("insert into sys_instore(device_number,purchaser_id,price) " +
            "VALUES (#{deviceNumber},#{purchaserId},#{price});")
    int insert(Instore instore);

    int update(Instore instore);
}
